package aimis.dto.form;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import aimis.domain.Attachment;

import java.util.HashSet;
import java.util.Set;

@Data
public class UserForm {

    @NotNull(groups = {DeleteUser.class,EditUser.class,ResetPassword.class})
    private Long id;
    @NotBlank(groups = {AddUser.class, EditUser.class})
    private String name;
    @NotBlank(groups = {AddUser.class, EditUser.class})
    private String loginName;
    @NotBlank(groups = {AddUser.class})
    private String password;
    private String description;
    private String email;
    private String tel;
    private Attachment avatarAttachment;
    @NotNull(groups = {AddUser.class, EditUser.class})
    private Long departmentId;
    private Long organizationId;
    private Set<Long> roleIds = new HashSet<>();

    public interface AddUser {
    }

    public interface EditUser {
    }

    public interface DeleteUser {
    }

    public interface ResetPassword {
    }
}
